bitkeeper revision 1.1011.1.9 (40dc63f3qxm-2Q66HLc1uEEnBDYKvg)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 25 Jun 2004 17:42:11 +0000 (17:42 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Fri, 25 Jun 2004 17:42:11 +0000 (17:42 +0000)
Remove evtchn exceptions.

linux-2.4.26-xen-sparse/arch/xen/drivers/evtchn/evtchn.c
linux-2.4.26-xen-sparse/include/asm-xen/evtchn.h
xen/common/event_channel.c
xen/include/hypervisor-ifs/hypervisor-if.h
xen/include/xen/event.h

index 985d72821d251860edbc0ac0f4b291ec69539f7d..8602c37453487477225e4a5c7465a0857883fbd7 100644 (file)
@@ -47,7 +47,6 @@ static spinlock_t lock;
 
 void evtchn_device_upcall(int port)
 {
-    u16 port_subtype;
     shared_info_t *s = HYPERVISOR_shared_info;
 
     spin_lock(&lock);
@@ -55,16 +54,11 @@ void evtchn_device_upcall(int port)
     mask_evtchn(port);
     clear_evtchn(port);
 
-    if ( likely(!synch_test_and_clear_bit(port, &s->evtchn_exception[0])) )
-        port_subtype = PORT_NORMAL;
-    else
-        port_subtype = PORT_EXCEPTION;
-
     if ( ring != NULL )
     {
         if ( (ring_prod - ring_cons) < RING_SIZE )
         {
-            ring[RING_MASK(ring_prod)] = (u16)port | port_subtype;
+            ring[RING_MASK(ring_prod)] = (u16)port;
             if ( ring_cons == ring_prod++ )
             {
                 wake_up_interruptible(&evtchn_wait);
index 128d766a340c4d72aeff6cd9035e0501260952a9..65093174a0a371a754447be517a9646e4311a5d9 100644 (file)
@@ -57,12 +57,6 @@ static inline void clear_evtchn(int port)
     synch_clear_bit(port, &s->evtchn_pending[0]);
 }
 
-static inline void clear_evtchn_exception(int port)
-{
-    shared_info_t *s = HYPERVISOR_shared_info;
-    synch_clear_bit(port, &s->evtchn_exception[0]);
-}
-
 static inline void notify_via_evtchn(int port)
 {
     evtchn_op_t op;
@@ -75,10 +69,6 @@ static inline void notify_via_evtchn(int port)
  * CHARACTER-DEVICE DEFINITIONS
  */
 
-#define PORT_NORMAL    0x0000
-#define PORT_EXCEPTION 0x8000
-#define PORTIDX_MASK   0x7fff
-
 /* /dev/xen/evtchn resides at device number major=10, minor=200 */
 #define EVTCHN_MINOR 200
 
index 840496d18207acd6979c7092825a85c91ab0a8f6..159c06119a785dbcc15c8f2cf6b9e0e5c804120e 100644 (file)
@@ -126,9 +126,6 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind)
     d2->event_channel[port2].u.remote.port = (u16)port1;
     d2->event_channel[port2].state         = ECS_INTERDOMAIN;
 
-    evtchn_set_pending(d1, port1);
-    evtchn_set_pending(d2, port2);
-    
  out:
     spin_unlock(&d1->event_channel_lock);
     if ( d1 != d2 )
@@ -299,8 +296,6 @@ static long __evtchn_close(struct domain *d1, int port1)
             BUG();
 
         chn2[port2].state = ECS_UNBOUND;
-        evtchn_set_exception(d2, port2);
-
         break;
 
     default:
@@ -308,7 +303,6 @@ static long __evtchn_close(struct domain *d1, int port1)
     }
 
     chn1[port1].state = ECS_FREE;
-    evtchn_set_exception(d1, port1);
 
  out:
     if ( d2 != NULL )
index ee507c7f3eac7a906e99292b16553948625ebf51..b6231e5ec5cf6e4e5d80c44cf0059da5e0cce1a6 100644 (file)
@@ -268,14 +268,10 @@ typedef struct shared_info_st
      *     device or the emergency console.
      * 
      * Event channels are addressed by a "port index" between 0 and 1023.
-     * Each channel is associated with three bits of information:
+     * Each channel is associated with two bits of information:
      *  1. PENDING -- notifies the domain that there is a pending notification
      *     to be processed. This bit is cleared by the guest.
-     *  2. EXCEPTION -- notifies the domain that there has been some
-     *     exceptional event associated with this channel (e.g. remote
-     *     disconnect, physical IRQ error). This bit is cleared by the guest.
-     *     A 0->1 transition of this bit will cause the PENDING bit to be set.
-     *  3. MASK -- if this bit is clear then a 0->1 transition of PENDING
+     *  2. MASK -- if this bit is clear then a 0->1 transition of PENDING
      *     will cause an asynchronous upcall to be scheduled. This bit is only
      *     updated by the guest. It is read-only within Xen. If a channel
      *     becomes pending while the channel is masked then the 'edge' is lost
@@ -289,14 +285,13 @@ typedef struct shared_info_st
      */
     u32 evtchn_pending[32];             /*   4 */
     u32 evtchn_pending_sel;             /* 132 */
-    u32 evtchn_exception[32];           /* 136 */
-    u32 evtchn_mask[32];                /* 264 */
+    u32 evtchn_mask[32];                /* 136 */
 
     /*
      * Time: The following abstractions are exposed: System Time, Clock Time,
      * Domain Virtual Time. Domains can access Cycle counter time directly.
      */
-    u64                cpu_freq;        /* 392: CPU frequency (Hz).          */
+    u64                cpu_freq;        /* 264: CPU frequency (Hz).          */
 
     /*
      * The following values are updated periodically (and not necessarily
@@ -305,8 +300,8 @@ typedef struct shared_info_st
      * incremented immediately after. See the Xen-specific Linux code for an
      * example of how to read these values safely (arch/xen/kernel/time.c).
      */
-    u32                time_version1;   /* 400 */
-    u32                time_version2;   /* 404 */
+    u32                time_version1;   /* 272 */
+    u32                time_version2;   /* 276 */
     tsc_timestamp_t    tsc_timestamp;   /* TSC at last update of time vals.  */
     u64                system_time;     /* Time, in nanosecs, since boot.    */
     u32                wc_sec;          /* Secs  00:00:00 UTC, Jan 1, 1970.  */
@@ -318,10 +313,10 @@ typedef struct shared_info_st
      * Allow a domain to specify a timeout value in system time and 
      * domain virtual time.
      */
-    u64                wall_timeout;    /* 440 */
-    u64                domain_timeout;  /* 448 */
+    u64                wall_timeout;    /* 312 */
+    u64                domain_timeout;  /* 320 */
 
-    execution_context_t execution_context; /* 456 */
+    execution_context_t execution_context; /* 328 */
 
 } PACKED shared_info_t;
 
index 0393215493229d540fb23ae87e8346bc1a4b340b..e7ee55da02c04a554b9d2296bd89fa81862183a1 100644 (file)
@@ -46,12 +46,6 @@ static inline void evtchn_set_pending(struct domain *d, int port)
     }
 }
 
-static inline void evtchn_set_exception(struct domain *d, int port)
-{
-    if ( !test_and_set_bit(port, &d->shared_info->evtchn_exception[0]) )
-        evtchn_set_pending(d, port);
-}
-
 /*
  * send_guest_virq:
  *  @d:        Domain to which virtual IRQ should be sent